package org.jeecg.modules.gwcjava.util;

public class FileNameUtils {

	/**
     * 获取文件后缀
     * @param fileName
     * @return
     */
    public static String getSuffix(String fileName){
        return fileName.substring(fileName.lastIndexOf("."));
    }

    /**
     * 和随机的UUID生成新的文件名
     * @param fileOriginName 源文件名
     * @return
     */
    public static String getFileName(String fileOriginName){
    	//return UUIDUtils.getUUID() + FileNameUtils.getSuffix(fileOriginName);
    	return String.valueOf(System.currentTimeMillis())+FileNameUtils.getSuffix(fileOriginName);
    }


}
